<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" name="row[id]" value="{$row['id']}">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('学校')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div data-toggle="cxselect" data-selects="school">
                <select class="form-control school" name="row[school_id]" data-url="common/schools">
                    <option value="{$row.school_id}"></option>
                </select>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text"
                   value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Behavior_category_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[behavior_category_type]', $behaviorCategoryTypeData, $row['behavior_category_type'],
            ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Time_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[time_type]', $timeTypeData, $row['time_type'], ['class'=>'form-control selectpicker',
            'data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group" id="week" style="{if $row.time_type == 2}display: none;{/if}">
        <label class="control-label col-xs-12 col-sm-2">{:__('选择日期')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_checkboxs('row[week][]', $weekData, $row['week'])}
        </div>
    </div>
    <div class="form-group" id="customer" style="{if $row.time_type == 1}display: none;{/if}">
        <label class="control-label col-xs-12 col-sm-2">{:__('选择时间段')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control daterange" name="row[customer]" type="text"
                   value="{if $row.customer_start_time > 0}{$row.customer_start_time_text} - {$row.customer_end_time_text}{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" data-rule="required" class="form-control datetimepicker"
                   data-date-format="HH:mm:ss" data-use-current="true" name="row[start_time]" type="text"
                   value="{$row.start_time_text}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" data-rule="required" class="form-control datetimepicker" data-date-format="HH:mm:ss"
                   data-use-current="true" name="row[end_time]" type="text" value="{$row.end_time_text}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
